package com.service.impl;

import java.util.List;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.dao.MenuDao;
import com.dao.OrgDao;
import com.dao.RegionDao;
import com.dao.TreeDao;
import com.service.BaseManager;

public class BaseManagerImpl extends UniversalManagerImpl implements
		BaseManager {

	protected final Log log = LogFactory.getLog(getClass());

	private MenuDao menuDao;
	private OrgDao orgDao;
	private RegionDao regionDao;
	private TreeDao treeDao;

	public MenuDao getMenuDao() {
		return menuDao;
	}

	public void setMenuDao(MenuDao menuDao) {
		this.menuDao = menuDao;
	}

	public OrgDao getOrgDao() {
		return orgDao;
	}

	public void setOrgDao(OrgDao orgDao) {
		this.orgDao = orgDao;
	}

	public RegionDao getRegionDao() {
		return regionDao;
	}

	public void setRegionDao(RegionDao regionDao) {
		this.regionDao = regionDao;
	}

	public TreeDao getTreeDao() {
		return treeDao;
	}

	public void setTreeDao(TreeDao treeDao) {
		this.treeDao = treeDao;
	}

	@Override
	public List getListMenu() {

		return menuDao.getListMenu();
	}

	@Override
	public List getListMenuByRoleCode(String roleCode) {

		return menuDao.getListMenuByRoleCode(roleCode);
	}

	@Override
	public List getListMenuTreeByCode(String code) {

		return menuDao.getListMenuTreeByCode(code);
	}

	@Override
	public List getListOrg() {

		return orgDao.getListOrg();
	}

	@Override
	public List getListOrgTreeByCode(String code) {

		return orgDao.getListOrgTreeByCode(code);
	}

	@Override
	public List getListRegion() {

		return regionDao.getListRegion();
	}

	@Override
	public List getListRegionTreeByCode(String code) {

		return regionDao.getListRegionTreeByCode(code);
	}

	@Override
	public List getListTree(String code, int type) {

		return treeDao.getListTree(code, type);
	}

	@Override
	public List getListTreeByCode(String code, int type, boolean enabled) {

		return treeDao.getListByParentCode(code, type, enabled);
	}

	@Override
	public List getListTreeByCode(String code, int type, int level,
			boolean enabled) {

		return treeDao.getListByParentCode(code, type, level, enabled);
	}

	@Override
	public List getListTreeByRoleCodeAndMenuCode(String roleCode,
			String menuCode) {

		return menuDao.getListMenuTree(roleCode, menuCode);
	}

	@Override
	public List getListTreeByType(int type, boolean enabled) {

		return treeDao.getListByType(type, enabled);
	}

	@Override
	public List getListTreeType() {

		return treeDao.getListTreeType();
	}

	@Override
	public Map getMapMenuUrlByMenuCode(String menuCode) {
		return menuDao.getMapMenuUrlByMenuCode(menuCode);
	}

	@Override
	public boolean saveMenuUrls(String menuCode, String urls) {
		return menuDao.saveMenuUrls(menuCode, urls);
	}

	@Override
	public List getListRoleUrls(String roleCode) {
		return menuDao.getListRoleUrls(roleCode);
	}

}
